package org.klout4j;

import java.util.Map;

public class KloutScore implements java.io.Serializable {

	private static final long serialVersionUID = 1L;

	double kscore = 0;
    double slope = 0;
    String description;
    String kclassId;
    String kclass;
    String kclassDescription;
    String kscoreDescription;
    double networkScore = 0;
    double amplificationScore = 0;
    long trueReach = 0;

    public KloutScore() {}

    public KloutScore(Map<String,Object> attributes) {
        kscore = Double.parseDouble(attributes.get("kscore").toString());
        slope = Double.parseDouble(attributes.get("slope").toString());
        description = (String)attributes.get("description");
        kclassId = attributes.get("kclass_id").toString();
        kclassDescription = (String)attributes.get("kclass_description");
        kscoreDescription = (String)attributes.get("kscore_description");
        networkScore =
            Double.parseDouble(attributes.get("network_score").toString());
        amplificationScore =
            Double.parseDouble(attributes.get("amplification_score").toString());
        trueReach = Long.parseLong(attributes.get("true_reach").toString());
    }
    
    public double getKscore() {
        return kscore;
    }
    public void setKscore(double kscore) {
        this.kscore = kscore;
    }

    public double getSlope() {
        return slope;
    }
    public void setSlope(double slope) {
        this.slope = slope;
    }

    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }

    public String getKclassId() {
        return kclassId;
    }
    public void setKclassId(String kclassId) {
        this.kclassId = kclassId;
    }

    public String getKclass() {
        return kclass;
    }
    public void setKclass(String kclass) {
        this.kclass = kclass;
    }

    public String getKclassDescription() {
        return kclassDescription;
    }
    public void setKclassDescription(String kclassDescription) {
        this.kclassDescription = kclassDescription;
    }

    public String getKscoreDescription() {
        return kscoreDescription;
    }
    public void setKscoreDescription(String kscoreDescription) {
        this.kscoreDescription = kscoreDescription;
    }

    public double getNetworkScore() {
        return networkScore;
    }
    public void setNetworkScore(double networkScore) {
        this.networkScore = networkScore;
    }

    public double getAmplificationScore() {
        return amplificationScore;
    }
    public void setAmplificationScore(double amplificationScore) {
        this.amplificationScore = amplificationScore;
    }

    public long getTrueReach() {
        return trueReach;
    }
    public void setTrueReach(long trueReach) {
        this.trueReach = trueReach;
    }

    public String toString() {
        return "KloutScore[kscore=" + kscore +
            ",slope=" + slope +
            ",description=" + description +
            ",kclassId=" + kclassId +
            ",kclass=" + kclass +
            ",kclassDescription=" + kclassDescription +
            ",kscoreDescription=" + kscoreDescription +
            ",networkScore=" + networkScore +
            ",amplificationScore=" + amplificationScore +
            ",trueReach=" + trueReach +
            "]";
    }
}
